import request from '../utils/request'
export function getTreeList() {
    return request({
        url: 'getTreeList',
        method: 'get',
        params: {
            connectionId: ''
        }
    })
}

export function getDatabasesInfoList() {
    return request({
        url: 'getDatabasesInfoList',
        method: 'get',
        params: {
            connectionId: ''
        }
    })
}

export function createDatabaseAndCollection(databaseName, collectionName) {
    return request({
        url: 'createDatabaseAndCollection',
        method: 'post',
        data: {
            databaseName: databaseName,
            collectionName: collectionName
        }
    })
}

export function dropDatabase(databaseName) {
    return request({
        url: 'dropDatabase',
        method: 'post',
        data: {
            databaseName: databaseName,
        }
    })
}